import 'package:flutter/material.dart';

class AppBarDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 2,
      child: Scaffold(
          appBar: AppBar(
              title: Text('AppBarDemo'),
              backgroundColor: Colors.blue,
              actions: [
                IconButton(icon: Icon(Icons.search, color: Colors.white)),
              ],
              bottom: TabBar(
                  tabs:[
                    Tab(text:'第一个'),
                    Tab(text:'第二个'),
                  ]
              )

          ),
          body: TabBarView(
              children:[
                Text('1111111'),
                Text('2222222'),
              ]
          ),
      )
    );
  }
}
